約 3,751,335 件
https://w.atwiki.jp/api_programming/pages/142.html
http //developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Graphics/Dc.html 下位ページ Content Class Toybox Graphics Dc関数(要約) Dc 関数(詳細) Dc(Object) clear() 背景色で塗りつぶして、スクリーン消去を実行する (Object) drawArc(x, y, r, attr, degreeStart, degreeEnd) (Object) drawBitmap(x, y, rez) (Object) drawCircle(x, y, radius) (Object) drawEllipse(x, y, a, b) (Object) drawLine(x1, y1, x2, y2) 2点間に線を引く (Object) drawPoint(x, y) 点を描画する (Object) drawRectangle(x, y, width, height) 塗りつぶさない長方形を描画する (Object) drawRoundedRectangle(x, y, width, height, radius) 角丸の長方形を描画する (Object) drawText(x, y, font, text, justification) テキストを指示された場所に表示する (Object) fillCircle(x, y, radius) 前景色で塗りつぶされた丸を描画する (Object) fillEllipse(x, y, a, b) 前景色で塗りつぶした楕円を描く (Object) fillPolygon(pts) 前景色で塗りつぶした多角形を描く (Object) fillRectangle(x, y, width, height) 前景色で塗りつぶした長方形を描画する (Object) fillRoundedRectangle(x, y, width, height, radius) 前景色で塗りつぶした角丸の長方形を描く (Number) getFontHeight(font) フォントの高さを取得する (Number) getWidth 画面の幅を取得する (Number) getHeight 画面の高さを取得する (Array) getTextDimensions(text, font) 文字列の幅、高さを取得する (Number) getTextWidthInPixels(text, font) 文字列の表示幅を Pixel 値で取得する (Object) setColor(foreground, background) 前景色、背景色を設定する (Object) setPenWidth(width) Class Toybox Graphics Dc Overview This class represents a device context. It provides methods to perform drawing operations on the device. Since 1.0.0 関数(要約) Dc (Object) clear Erase the screen using the background color by calling clear(). (Object) drawArc(x, y, r, attr, degreeStart, degreeEnd) Use drawArc() to draw an arc. (Object) drawBitmap(x, y, rez) Draw a bitmap to the screen with drawBitmap(). (Object) drawCircle(x, y, radius) Use drawCircle() to draw a circle around a point. (Object) drawEllipse(x, y, a, b) Use drawEllispe() to draw an ellipse around a point. (Object) drawLine(x1, y1, x2, y2) Draw a line between two points using drawLine(). (Object) drawPoint(x, y) Draw a point on the screen with drawPoint(). (Object) drawRectangle(x, y, width, height) 塗りつぶさない長方形を描画する (Object) drawRoundedRectangle(x, y, width, height, radius) Draw a rounded rectangle with drawRoundedRectangle(). (Object) drawText(x, y, font, text, justification) テキストを指示された場所に表示する (Object) fillCircle(x, y, radius) Fill a circle with the foreground color using fillCircle(). (Object) fillEllipse(x, y, a, b) Fill an ellipse with the foreground color using fillEllipse(). (Object) fillPolygon(pts) To fill a polygon, use fillPolygon(). (Object) fillRectangle(x, y, width, height) 前景色で塗りつぶした長方形を描画する (Object) fillRoundedRectangle(x, y, width, height, radius) Fill a rounded rectangle with the foreground color using fillRoundedRectangle(). (Number) getFontHeight(font) Get The Font Height by using getFontHeight(). (Number) getWidth 画面の幅を取得する (Number) getHeight 画面の高さを取得する (Array) getTextDimensions(text, font) Get the width and height of a string. (Number) getTextWidthInPixels(text, font) Get the width of a string with getTextWidthInPixels(). (Object) setColor(foreground, background) Use setColor() to set the current foreground and background colors. (Object) setPenWidth(width) Use setPenWidth() to set the width of a line. 関数(詳細) Dc (Object) clear() 背景色で塗りつぶして、スクリーン消去を実行する Since 1.0.0 (Object) drawArc(x, y, r, attr, degreeStart, degreeEnd) Use drawArc() to draw an arc. 0 degree 3 o clock position. 90 degrees 12 o clock position. 180 degrees 9 o clock position. 270 degrees 6 o clock position. Parametersx (Number) X location of arc center y (Number) Y location of arc center r (Number) radius of arc. attr (Number) Arc drawing attributes. (ARC_COUNTER_CLOCKWISE or ARC_CLOCKWISE) degreeStart (Number) The start angle of the arc by degrees. degreeEnd (Number) The end angle of the arc by degrees. Since 1.2.0 (Object) drawBitmap(x, y, rez) Draw a bitmap to the screen with drawBitmap(). Parameters x (Number) Top left X coordinate to begin the draw y (Number) Top left Y coordinate to begin the draw rez (Symbol) The bitmap resource to draw Since 1.0.0 (Object) drawCircle(x, y, radius) Use drawCircle() to draw a circle around a point. Parametersx (Number) X location of circle center y (Number) Y location of circle center radius (Number) Radius of circle Since 1.0.0 (Object) drawEllipse(x, y, a, b) Use drawEllispe() to draw an ellipse around a point. Parametersx (Number) X location of ellipse center y (Number) Y location of ellipse center a (Number) The radius of the ellipse along the x axis b (Number) The radius of the ellipse along the y axis Since 1.0.0 (Object) drawLine(x1, y1, x2, y2) 2点間に線を引く Parametersx1 (Number) 1点目のX y1 (Number) 1点目のY x2 (Number) 2点目のX y2 (Number) 2点目のY Since 1.0.0 (Object) drawPoint(x, y) 点を描画する Parametersx (Number) X location of point y (Number) Y location of point Since 1.0.0 (Object) drawRectangle(x, y, width, height) 塗りつぶさない長方形を描画する Parameters x (Number) 左上のX位置 y (Number) 左上のY位置 width (Number) 横幅 height (Number) 縦幅 Since 1.0.0 (Object) drawRoundedRectangle(x, y, width, height, radius) 角丸の長方形を描画する Parametersx (Number) X location of upper corner y (Number) Y location of upper corner width (Number) Width value of rectangle height (Number) Height value of rectangle radius (Number) Radius of rounding. Since 1.0.0 (Object) drawText(x, y, font, text, justification) テキストを指示された場所に表示する Parametersx (Number) X位置(justification でテキストのどこに合わせるかを決める) y (Number) Y位置(justification でテキストのどこに合わせるかを決める) font (Number) フォント(サイズ)。リソースの指定、もしくはGraphics.FONT_XXX。 text (Number) 文字列 justification Graphics.TEXT_JUSTIFY_XXX(定数) Since 1.0.0 (Object) fillCircle(x, y, radius) 前景色で塗りつぶされた丸を描画する Parametersx (Number) X location of circle center y (Number) Y location of circle center radius (Number) Radius of circle Since 1.0.0 (Object) fillEllipse(x, y, a, b) 前景色で塗りつぶした楕円を描く Parametersx (Number) 中心のX位置 y (Number) 中心のY位置 a (Number) The radius of the ellipse along the x axis b (Number) The radius of the ellipse along the y axis Since 1.0.0 (Object) fillPolygon(pts) 前景色で塗りつぶした多角形を描く Parameterspts (Array) Array of coordinates with a 64 point limit Since 1.0.0 (Object) fillRectangle(x, y, width, height) 前景色で塗りつぶした長方形を描画する Parametersx (Number) 左上のX位置 y (Number) 左上のY位置 width (Number) 横幅 height (Number) 縦幅 Since 1.0.0 (Object) fillRoundedRectangle(x, y, width, height, radius) 前景色で塗りつぶした角丸の長方形を描く Parametersx (Number) 左上のX位置 y (Number) Y location of upper corner width (Number) Width value of rectangle height (Number) Height value of rectangle radius (Number) Radius of rounding Since 1.0.0 (Number) getFontHeight(font) フォントの高さを取得する Parametersfont (Number) Font to use Returns (Number) The height of the font Since 1.0.0 (Number) getWidth 画面の幅を取得する Returns (Number) ディスプレイ幅 Since 1.0.0 機種 値 ForeAthlete920XT 205 (Number) getHeight 画面の高さを取得する Returns (Number) Height of display Since 1.0.0 機種 値 ForeAthlete920XT 148 (Array) getTextDimensions(text, font) 文字列の幅、高さを取得する 幅、高さ、は行数を考慮して決められる。ある文字列が2回改行する場合は、高さは3行分、幅は最大幅が返る。 Parameterstext (String) Text to get width for font FONT constant or font resource of text Returns (Array) width, height of string in pixels Since 1.0.0 (Number) getTextWidthInPixels(text, font) 文字列の表示幅を Pixel 値で取得する Parameterstext (String) Text to get width for font FONT 定数値 or font resource of text Returns (Number) Width of string in pixels Since 1.0.0 (Object) setColor(foreground, background) 前景色、背景色を設定する Parametersforeground Graphics.COLOR_* (定数値) or 24-bit integer of the form 0xRRGGBB background Graphics.COLOR_* (定数値) or 24-bit integer of the form 0xRRGGBB Since 1.0.0 (Object) setPenWidth(width) Use setPenWidth() to set the width of a line Parameterswidth (Number) in pixels Since 1.0.0
https://w.atwiki.jp/sk_tdyk/pages/19.html
Directshowとは? DirectXの機能の一部らしい。 動画、音声を取り扱うよう この考え方がまためんどい。 簡単に書くと「フィルタ」というオブジェクト単位でものを考え、 たとえば、カメラ自体も「フィルタ」、再生(出力)部も「フィルタ」みたい。 それをつなぐとか…よくわからん やることは以下。 1)フィルタを管理する「グラフ」というものを作る 2)「グラフ」に使用できるカメラを「入力フィルタ」として登録する 3)「入力フィルタ」の使用できるピン(フィルタからの出力)を探す 4)出力フィルタに3)のピンを接続する 5)サンプルグラバを入力フィルタと出力フィルタの間に入れる 準備編 VB6.0において使用するには、設定が必要。 [プロジェクト]-[参照設定]から ”Active movie control type library” を選択する カメラのオプションパラメータの取得 IAMCameraControlというのがそれらしいが、どうにもVBでの制御方法がわからない ↓をみると、IAMCameraControlはいない! http //msdn.microsoft.com/ja-jp/library/cc371137.aspx つまり…VBでは無理?VCで最初からやればよかった… …と思いきや カメラのプロパティをみる UVCカメラのプロパティを呼び出すにはVB6だといろいろ面倒なよう だが、DLLとしてまとめてくれている偉人発見。 しかもsampleそのまま使えそう http //www.geocities.co.jp/SiliconValley/7406/tips/dshow/index.html 今回は、これを使用してカメラプロパティを設定するようにした。 解像度などは、設定を読み込み、再設定することが可能(DLLのAPI使用) なので、解像度を最大にするよう使用。 マイクロソフトによるVBでのDirectshowの使い方 http //msdn.microsoft.com/ja-jp/library/dd188521.aspx#VBDemo よくわからん用語 タイプライブラリとは タイプライブラリとは、VBからCOMオブジェクトへアクセスするための「インターフェイス」が格納されているライブラリ。 「インターフェイス」とは、『メソッドやプロパティの宣言の集まり』の事を指します。これはある意味では「クラス」に似ていますが、クラスとは異なり、プログラムコードの「実装」がありません。あくまで、メソッドの定義だけなのです。 しかし、VB6では、インターフェイスを定義することが出来ないため、それらを「タイプライブラリ」という物にしておき、それを通してアクセスする事になるのです。使いたいCOMの「タイプライブラリ」はVB6統合環境のメニューのプロジェクトの参照設定で指定できます。 つまり、タイプ ライブラリは、COMオブジェクトで公開されるプロパティおよびメソッド等の型が記述され、COMオブジェクトとスクリプト言語(VB)との間に橋渡しを提供します。 VBでカメラオプションをみるためには本来これを設定しなければならなかったが、DLLとして提供されていたのでそれを使用した。 サンプルグラバとは 「サンプル グラバ フィルタは変換フィルタで、このフィルタを使ってストリームがフィルタグラフを通過するときにストリームからメディア サンプルを捕捉できる」by msdn ようするにカメラフィルタから、別フィルタへつないでる間に入れることにより、そのイメージを取り込むことができるみたい。 静止画取得に使用する機能のようだ 取得形式はYUV(今回使用したのはYUY2)、BMP32bitなど選択できる。 本当は入力フィルタから複数の出力ピンを接続するときは、分岐用フィルタを通すみたいだが、 今回は直列につないで動いた。 先は長い… orz
https://w.atwiki.jp/abwiki/pages/605.html
初心者向けの解説。 APIっていうのはね、 アプリを作るためにOSが用意した関数のこと。 システムコールと同じような意味。 上級者向けの解説。 APIっていうのはね。 アプリ開発のインタフェース。 Cに置いては、関数やマクロである。 バッチファイルではコマンドがAPIになる。 UnixやLinuxのシステムコールとの違いは、 システムコールは完全にOSへの命令であるのに対し APIは、システムコールを含めた、アプリ開発の便利な命令、関数、その他もろもろをふくんでいる。
https://w.atwiki.jp/mccc/pages/49.html
このページではVector APIについて解説する。 参考資料: Vector API 執筆時のバージョン: ComputerCraft 1.58 for Minecraft 1.6.4 Vector APInew ベクトルadd sub mul dot cross length normalize round tostring Vector API ベクトルに関するAPI。 3次元のベクトルを表す値を作成し、それを操作することができる。GPSで3次元の位置を計算する時にも使われている。 作成したベクトルを操作する各メソッドへのアクセスは (コロン)を用いて行う。また、一部の算術演算子でも操作することができる。 Luaのテーブルやメタテーブルを用いてオブジェクト指向のクラスに似た機構として実装されている。ソースは是非とも一読の事。 assets\computercraft\lua\rom\apis\vector で定義 new vector.new( x, y, z ) 成分x(数値)、y(数値)、z(数値)のベクトルを表す値を作成して返す。引数を省略した(nil)成分は0になる 戻り値:テーブル型。ベクトル 戻り値はテーブル型であるため、戻り値から各成分(x、y、z)やメソッドへアクセスできる。 例: local a = vector.new( 1, 2, 3 ) print( a.x ) print( a.y ) print( a.z ) 数値 1, 2, 3 を成分としたベクトルを作成して変数aに代入し、各成分を表示する。 画面には以下のように表示される。 1 2 3 ベクトル vector.new関数で取得したベクトルのメソッドを用いてベクトル操作を行う。 ベクトルの各成分(x、y、z)へのアクセスは"."を、各メソッドへのアクセスは" "を用いて行う。 ペクトル(テーブル型)は要素として各成分を表すキー(x、y、z)と内部で設定されたメタテーブルを持つ。 +... メタテーブルによって各メソッドへのアクセスや、一部の演算子(+、-、*)のイベントに対するメタメソッド、tostring関数から呼び出されたときに発生するイベントに対するメタメソッドが設定されている。 各メソッドへのアクセスは、ベクトルのテーブルにアクセスしたときに発生するindexイベント(__indexキー)で、元のテーブルにないキー(x、y、z以外のキー)へアクセスしたときに、代わりに各メソッドの関数を要素としたテーブル(vectorファイル内のlocal vector)へアクセスするように設定することで行っている。 assets\computercraft\lua\rom\apis\vector で定義 add vectorA add( vectorB )vectorA + vectorB ベクトルvectorAにベクトルvectorBを足した結果を新しいベクトルとして返す 戻り値:テーブル型。計算結果のベクトル 例: local a = vector.new( 1, 2, 3 ) local b = vector.new( 4, 5, 6 ) local c = a add( b ) print( c tostring() ) ベクトルa(成分:1, 2, 3)にベクトルb(成分:4, 5, 6)を足した結果のベクトルをcへ代入し、その成分を文字列として表示する。 結果として 5,7,9 が表示される。 代わりに演算子+を用いることもできる(メタテーブルでaddイベント(__addキー)のメタメソッドにも設定されているため)。 例: local a = vector.new( 1, 2, 3 ) local b = vector.new( 4, 5, 6 ) local c = a + b print( c tostring() ) sub vectorA sub( vectorB )vectorA - vectorB ベクトルvectorAからベクトルvectorBを引いた結果を新しいベクトルとして返す 戻り値:テーブル型。計算結果のベクトル 例: local a = vector.new( 1, 2, 3 ) local b = vector.new( 3, 2, 1 ) local c = a sub( b ) print( c tostring() ) ベクトルa(成分:1, 2, 3)からベクトルb(成分:3, 2, 1)を引いた結果のベクトルをcへ代入し、その成分を文字列として表示する。 結果として -2,0,2 が表示される。 代わりに演算子-を用いることもできる(メタテーブルでsubイベント(__subキー)のメタメソッドにも設定されているため)。 例: local a = vector.new( 1, 2, 3 ) local b = vector.new( 3, 2, 1 ) local c = a - b print( c tostring() ) mul vectorA mul( n )vectorA * n ベクトルvectorAにスカラー値n(数値)を掛けた結果を新しいベクトルとして返す 戻り値:テーブル型。計算結果のベクトル 例: local a = vector.new( 1, 2, 3 ) local b = 2.5 local c = a mul( b ) print( c tostring() ) ベクトルa(成分:1, 2, 3)に数値b(2.5)を掛けた結果のベクトルをcへ代入し、その成分を文字列として表示する。 結果として 2.5,5,7.5 が表示される。 代わりに演算子*を用いることもできる(メタテーブルでmulイベント(__mulキー)のメタメソッドにも設定されているため)。 例: local a = vector.new( 1, 2, 3 ) local b = 2.5 local c = a * b print( c tostring() ) 単項演算子-を用いると符号を反転することができる。これは vectorA mul( -1 ) と同様である(メタテーブルでunmイベント(__unmキー)のメタメソッドに設定されている)。 例: local a = vector.new( 1, 2, 3 ) local b = -a print( b tostring() ) ベクトルa(成分:1, 2, 3)の符号を反転したベクトルをbへ代入し、その成分を文字列として表示する。 結果として -1,-2,-3 が表示される。 割り算のメソッドは無いが、スカラー値で割りたい場合は、逆数を掛ければよい。 dot vectorA dot( vectorB ) ベクトルvectorAとベクトルvectorBのドット積(内積)を求める 戻り値:数値型 例: local a = vector.new( 1, 2, 3 ) local b = vector.new( 4, 5, 6 ) local c = a dot( b ) print( c ) ベクトルa(成分:1, 2, 3)とベクトルb(成分:4, 5, 6)のドット積の結果をcへ代入し、それを表示する。 結果として 32 が表示される。 cross vectorA cross( vectorB ) ベクトルvectorAとベクトルvectorBのクロス積(外積)の結果を新しいベクトルとして返す 戻り値:テーブル型。計算結果のベクトル 例: local a = vector.new( 1, 2, 3 ) local b = vector.new( 4, 5, 6 ) local c = a cross( b ) print( c tostring() ) ベクトルa(成分:1, 2, 3)とベクトルb(成分:4, 5, 6)のクロス積の結果のベクトルをcへ代入し、その成分を文字列として表示する。 結果として -3,6,-3 が表示される。 length vectorA length() ベクトルvectorAの大きさを求める 戻り値:数値型 例: local a = vector.new( 2, 5, 9 ) local b = a length() print( b ) ベクトルa(成分:2, 5, 9)の大きさを求めてbへ代入し、それ表示する。 結果として 10.488089 が表示される。 normalize vectorA normalize() ベクトルvectorAを正規化した結果を新しいベクトルとして返す 戻り値:テーブル型。計算結果のベクトル 例: local a = vector.new( 1, 2, 3 ) local b = a normalize() print( b tostring() ) print( b length() ) ベクトルa(成分:1, 2, 3)を正規化した結果のベクトルをbへ代入し、その成分を文字列として表示し、次の行にその大きさを表示する。 結果として1行目に 0.26726124,0.5345225,0.80178374 が、2行目に 1 (正規化した単位ベクトルなので大きさは1)が表示される。 round vectorA round() ベクトルvectorAの各成分の値の小数部分を丸めて整数にした結果を新しいベクトルとして返す 戻り値:テーブル型。計算結果のベクトル 各成分の値に対して0.5を足してmath.floor関数で丸め処理を行っている。 return vector.new( math.floor( self.x + 0.5 ), math.floor( self.y + 0.5 ), math.floor( self.z + 0.5 ) ) 例えば、負の数では -0.51 → -1、-0.5 → 0、正の数では 0.49 → 0、0.5 → 1。 例: local a = vector.new( 1.4999, 1.5, 3.14 ) local b = a round() print( b tostring() ) ベクトルa(成分:1.4999, 1.5, 3.14)の各成分の小数部分を丸めた結果のベクトルをbへ代入し、その成分を文字列として表示する。 結果として 1,2,3 が表示される。 tostring vectorA tostring() ベクトルvectorAの成分を文字列として返す 戻り値:文字列型 返る文字列のフォーマットは"x,y,z"。 ベクトルそのものがtostring関数から呼び出されたときも同様の文字列を返す(メタテーブルでtostringイベント(__tostringキー)のメタメソッドにも設定されているため)。 例: local a = vector.new( 1, 2, 3 ) local b = a tostring() print( b ) ベクトルa(成分:1, 2, 3)の成分を文字列にしてbへ代入し、それを表示する。 結果として 1,2,3 が表示される。
https://w.atwiki.jp/api_programming/pages/138.html
Class Toybox Activity Info 下位ページ Content Class Toybox Activity Info属性 Instance Attribute Details(Number) elapsedTime Activity の経過時間[msec] (Number) timerTime 計測時間[ms] (Moment) startTime activity の開始時間 (Float) elapsedDistance 距離[m] (Float) averageDistance 水泳の(前のインターバルでの)ストロール平均距離[m] (Float) currentSpeed 現在速度[m/s] (Float) averageSpeed 平均速度[m/s] (Float) maxSpeed 現在のアクティビティの最高速度[m/s] (Number) currentHeartRate 現在の心拍数[bpm] (Number) averageHeartRate 平均心拍数[bpm] (Number) maxHeartRate (Float) altitude 現在の標高[m] (Float) totalAscent 総上昇量[m] (Float) totalDescent 総下降量[m] (Number) currentCadence 現在のケイデンス[rpm](ランニング中はピッチ[bpm]) (Number) averageCadence セッション中の平均ケイデンス[rpm](ランニング中はピッチ[bpm]) (Number) maxCadence セッション中の最大ケイデンス[rpm](ランニング中はピッチ[bpm]) (Number) calories 現在のアクティビティの間に消費されたかろりー[kcal] (Float) currentHeading 現在の真北の方向[rad] (Location) currentLocation 現在の位置 (Location) startLocation アクティビティの開始位置 (Number) currentLocationAccuracy GPS 精度 (Float) energyExpenditure (Number) currentPower (Number) averagePower 平均パワー[W] (Number) maxPower 最大パワー[W] (Number) swimStrokeType 泳ぎ方 (Number) swimSwolf 直前の長さから求めたSWOLFスコア (Float) trainingEffect Class Toybox Activity Info 現在のアクティビティ情報をもつクラス。使う前には各フィールドのnullチェックを行うこと。 Activity.getActivityInfo()で取得された時点の値を持っている。(更新したい場合は再度取得する必要がある。) 属性 Time(Number) elapsedTime Activity の経過時間[msec] (Moment) startTime activity の開始時間 (Number) timerTime 計測時間[ms] Distance(Float) elapsedDistance 距離[m] (Float) averageDistance 水泳の(前のインターバルでの)ストロール平均距離[m] Speed(Float) currentSpeed 現在速度[m/s] (Float) averageSpeed 平均速度[m/s] (Float) maxSpeed 現在のアクティビティの最高速度[m/s] HeartRate(Number) currentHeartRate The current heart rate in beats per minute. (Number) averageHeartRate The average heart rate in beats per minute. (Number) maxHeartRate The maximum heart rate in beats per minute. Cadence(Number) currentCadence 現在のケイデンス[rpm](ランニング中はピッチ[bpm]) (Number) averageCadence セッション中の平均ケイデンス[rpm](ランニング中はピッチ[bpm]) (Number) maxCadence セッション中の最大ケイデンス[rpm](ランニング中はピッチ[bpm]) Power(Number) currentPower The current power in watts. (Number) averagePower The average power in watts. (Number) maxPower The maximum power in watts. Location(Location) currentLocation The current location. (Location) startLocation The starting location of the activity. (Number) currentLocationAccuracy GPS Accuracy (See the accuracy member of the Info object Altitude(Float) altitude The altitude in meters. (Float) totalAscent The total ascent in meters. (Float) totalDescent The total descent in meters. (Float) currentHeading The current true north referenced heading in radians. in the Position module for more information). Calorie(Number) calories The current calories burned during the current activity being recorded in kcal. (Float) energyExpenditure Momentary energy expenditure in kcals/min (www.firstbeat.com/consumers/analyzed-by-firstbeat-features#4). (Float) trainingEffect Training Effect The activity s level of effect on aerobic fitness. Swim(Number) swimStrokeType The swim stroke type from the previous length. (Number) swimSwolf The swimming SWOLF score from the previous length. Instance Attribute Details (Number) elapsedTime Activity の経過時間[msec] 途中で Session を停止させても、elaspedTime は経過し続ける。 Returns (Number) Since 1.0.0 (Number) timerTime 計測時間[ms] 途中で Session を停止させると、timerTime は停止する。Session を再び開始すると、そこから増加し始める。 Returns (Number) Since 1.0.0 (Moment) startTime activity の開始時間 Session.start() の時間。Moment は不変の値に使われる。 Returns (Moment) Since 1.0.0 (Float) elapsedDistance 距離[m] Returns (Float) Since 1.0.0 (Float) averageDistance 水泳の(前のインターバルでの)ストロール平均距離[m] Returns (Float) Since 1.2.2 (Float) currentSpeed 現在速度[m/s] Connect IQ/APIメモ/Toybox/Position/Info こちらの speed() も参照。 Returns (Float) Since 1.0.0 (Float) averageSpeed 平均速度[m/s] The average is computed as the elapsed 3-D accumulated distance divided by the elapsed time. Returns (Float) Since 1.0.0 (Float) maxSpeed 現在のアクティビティの最高速度[m/s] Returns (Float) Since 1.0.0 (Number) currentHeartRate 現在の心拍数[bpm] Returns (Number) Since 1.0.0 (Number) averageHeartRate 平均心拍数[bpm] The average heart rate in beats per minute Returns (Number) Since 1.0.0 (Number) maxHeartRate The maximum heart rate in beats per minute Returns (Number) Since 1.0.0 (Float) altitude 現在の標高[m] Returns (Float) Since 1.0.0 (Float) totalAscent 総上昇量[m] Returns (Float) Since 1.0.0 (Float) totalDescent 総下降量[m] Returns (Float) Since 1.0.0 (Number) currentCadence 現在のケイデンス[rpm](ランニング中はピッチ[bpm]) Returns (Number) Since 1.0.0 (Number) averageCadence セッション中の平均ケイデンス[rpm](ランニング中はピッチ[bpm]) Returns (Number) Since 1.0.0 (Number) maxCadence セッション中の最大ケイデンス[rpm](ランニング中はピッチ[bpm]) Returns (Number) Since 1.0.0 (Number) calories 現在のアクティビティの間に消費されたかろりー[kcal] Returns (Number) Since 1.0.0 (Float) currentHeading 現在の真北の方向[rad] この値は Position モジュールの heading と同じ。移動中の方角の情報。停止中は(機能としてあれば)コンパスの方向になる。 Returns (Float) Since 1.0.0 (Location) currentLocation 現在の位置 Returns (Location) Since 1.0.0 (Location) startLocation アクティビティの開始位置 Returns (Location) Since 1.0.0 (Number) currentLocationAccuracy GPS 精度 Connect IQ/APIメモ/Toybox/Position/Info も参照のこと。 Returns (Number) Position.QUALITY_XXX value Since 1.0.0 (Float) energyExpenditure Momentary energy expenditure in kcals/min (www.firstbeat.com/consumers/analyzed-by-firstbeat-features#4) Returns (Float) Since 1.2.0 (Number) currentPower The current power in watts Returns (Number) Since 1.0.0 Supported Devices Forerunner 920XT, fenix 3, epix, All Edges (Number) averagePower 平均パワー[W] Returns (Number) Since 1.0.0 Supported Devices Forerunner 920XT, fenix 3, epix, All Edges (Number) maxPower 最大パワー[W] Returns (Number) Since 1.0.0 Supported Devices Forerunner 920XT, fenix 3, epix, All Edges (Number) swimStrokeType 泳ぎ方 Returns (Number) Activity.SWIM_STROKE_XXX value Since 1.2.2 (Number) swimSwolf 直前の長さから求めたSWOLFスコア Returns (Number) Since 1.2.2 SWOLF "Swim Golf", ストローク数/プール長 + その距離を泳ぐのにかかった時間。あるプールを30秒、10回のストロークで泳いだとすれば、SWOLF = 30 + 10 = 40。低いほど良い(ゴルフのように)。 (Float) trainingEffect Training Effect The activity s level of effect on aerobic fitness. (www.firstbeat.com/consumers/analyzed-by-firstbeat-features#3) Returns (Float) Since 1.2.0
https://w.atwiki.jp/aniken/pages/152.html
元は3DCGを扱うソフトらしいけど、管理人にはさっぱり分かりません。情報求ム。 アニメ部では長らく撮影に使用していたが、08年度をもってRETAS!を中心とした制作システムに一新され、現在は動画チェックでの使用が主となっている。 DIRECTORとcoreRETASの主な違い フレームレートが自由に変えられる DIRECTOR上ではぼかしや透過光等の特殊効果が使用できない 合成モードの名称が英語 タイムシートのことをタイムラインと呼ぶ。 DIRECTORの使い方 基本 素材を読み込み、タイムラインに並べ、動画を書き出す。 メニューバーのファイル→読み込みから素材(.psdファイルなど)を開くと、内臓キャストウィンドウに登録されるので、そこからタイムラインまでドラッグして並べる。 Altキーを押しながら並べると、1フレームずつ置く事が出来る。(ただし、1フレームまで短くすると以降伸ばせないので注意) 複数のファイルを選択し、Altを押しながらドラッグすると、各ファイルを1フレームずつ配置する事もできる。 画像の拡大縮小・平行移動 トゥイーンを参照 フェード トゥイーンと不透明度を使う。 タイムラインに「%」と書かれたプルダウンメニューがあるので、そこで不透明度を指定してフェードさせる。 よくある間違い 素材を読み込むとき、読み込みではなくメニューバーのファイル→開くを無意識に押してしまうことがあるので、注意。
https://w.atwiki.jp/toodledoapi/pages/16.html
Developer s API Documentation Tasks http //api.toodledo.com/2/tasks/index.php 同期 Syncing 多くのサードパーティ製アプリケーションの主たる目的は、タスクの同期をすることです。この勧めに従えば、きれいで効率的にタスクを同期することができます。最重要事項の一つとしては、「タスク最終更新」("lastedit_task")または「タスク最終削除」("lastdelete_task")のタイムスタンプを用いることです。これはアカウント情報("Account Info")から返されるもので、アプリケーションがサーバーから差分を取得・更新・削除する前に、サーバー上で変更があったかどうかを知ることができます。たいていの場合は、同期してもサーバー上に変更はなく、何もする必要がないので、タイムスタンプを用いることによって処理量・時間を大きく削減することができます。 図(本家サイトより拝借・加工。問題がある場合はご連絡ください) アプリケーションとToodledoとの同期においては、以下の7つのシナリオを扱えなければなりません。 アプリケーションへのタスク追加 アプリケーションでのタスク更新 アプリケーションからのタスク削除 Toodledoサーバへのタスク追加 Toodledoサーバでのタスク更新 Toodledoサーバからのタスク削除 アプリケーションとサーバ双方でタスクが変更されている シナリオ1, 2, 3では、アプリケーションはタスクを追加・更新・削除するために、それぞれ /tasks/add.php, /tasks/edit.php, /tasks/delete.php のAPIを用いることになります。追加と削除の場合は事前チェックの必要はありませんが、更新をする前には差分を取得し、修正日の比較をすることにより、タスクのより新しい更新を上書きしてしまわないようにしなければなりません。 シナリオ4, 5, 6では、アプリケーションはそれぞれ /tasks/get.php または /tasks/get_deleted.php のAPIを用いることになります。シナリオ7では、アプリケーションは修正日を比較し、双方で更新されているのかどうかを判断した後、ユーザーにどちらの版を残すかを尋ねます。すべてのシナリオは上のフローチャートに従うことで効率よく処理することができます。 タスクの属性 タスクにはいろいろ設定・取得できる項目があります。それらの属性の詳細を説明します。 id このタスクのサーバーID番号です。アカウントごとに一意であることが保証されていますが、アカウントが違えば同じID番号で違った内容のタスクになります。 title タスクの名前を表す文字列です。255文字まで。設定する際、 は %26 に、; は %3B にそれぞれエンコードしてください。 tag タスクにつけるタグです。コンマ , で区切られた文字列リストです。64文字まで。設定する際、 は %26 に、; は %3B にそれぞれエンコードしてください。 folder フォルダのID番号です。フォルダに登録しない場合はこの項目自体を書き漏らしておくか、0を設定してください。 context コンテクストのID番号です。フォルダに登録しない場合はこの項目自体を書き漏らしておくか、0を設定してください。 goal ゴールのID番号です。フォルダに登録しない場合はこの項目自体を書き漏らしておくか、0を設定してください。 location ロケーションのID番号です。フォルダに登録しない場合はこの項目自体を書き漏らしておくか、0を設定してください。 parent プロアカウント項目です。サブタスクへのアクセスに用いられます。サブタスクを作成するには、ここに親タスクの番号を設定します。デフォルトは0で、この場合は普通のタスクが作成されます。 children プロアカウント項目です。サブタスクへのアクセスに用いられます。このタスクが持っている子タスクの数を示します。サブタスクや、普通のタスクでは0となります。 order プロアカウント項目です。サブタスクへのアクセスに用いられます。これはintegerで、親タスク内での当該サブタスクの順番を示します。現在、これは読み取り専用としています。 duedate タスクの期限日についての、GMT unixのタイムスタンプです。このタイムスタンプのうち、時間の部分は関係ありません。サーバーから取得した際には、つねに正午に設定されます。 duedatemod due date modifierがどれなのか示すintegerです。 0:この日までに(Due by) 1:この日に(Due On:=) 2:この日以降に(Due After) 3:オプション的(?) startdate タスクの開始日についての、GMT unixのタイムスタンプです。このタイムスタンプのうち、時間の部分はつねに正午に設定されます。 duetime タスクの期限時間についての、GMT unixのタイムスタンプです。期限時間が設定されていなければ、0となります。期限日が設定されていないのに期限時間が設定されている場合、このタイムスタンプの日付は1970年1月1日に設定されます。時間はfloating timesで記録されます。言い換えれば、10amとして設定されたものはそのタイムゾーンにおける10amです。このタイムスタンプをGMTの文字列に変換し、タイムゾーンに関わらず表示することもできます。 starttime タスクの開始時間についての、GMT unixのタイムスタンプです。開始時間が設定されていなければ、0となります。開始日が設定されていないのに開始時間が設定されている場合、このタイムスタンプの日付は1970年1月1日に設定されます。時間はfloating timesで記録されます。言い換えれば、10amとして設定されたものはそのタイムゾーンにおける10amです。このタイムスタンプをGMTの文字列に変換し、タイムゾーンに関わらず表示することもできます。 remind duedateやduetimeのリマインダを送るまでの時間(分)をあらわすintegerです。リマインダがなければ0を設定します。設定値はリストに示される有効な数値に限られます(0, 1, 15, 30, 45, 60, 90, 120, 180, 240, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 20160, 43200)。プロアカウントでなければ、0か60に限られます。無効な数値を入力すると、0でない近傍の数値に修正されます。 repeat タスクをどのように繰り返すかを示す文字列です。"Every 1 Week" や "On the 2nd Friday" です。詳しくはrepeat format faqを参照してください。タスクがリスケジュールされた際は、新しい日付に移行します。記録を残すためには、タスクの完全なコピーをユーザーのリストに加えるようにしてください。ここの場合は、新しいタスクには別のID番号が与えられ、終了状態となります。繰り返しを解除するには、空の文字列を設定してください。 repeatfrom どのようにタスクが繰り返されるのかを示します。0であれば期限日を基準とし、1であれば終了日を基準として繰り返します。 status タスクの状態を示すintegerです。 0:None なし 1:New Action 新しいアクション 2:Active アクティブ 3:Planning 計画中 4:Delegated 委託中 5:Waiting 待機 6:Hold 保留 7:Postponed 延期 8:Someday いつか 9:Canceled 中止 10:Reference 照会 length 終了までにかかる予想時間(分)を表すintegerです。 priority 優先度を表すintegerです。 -1:Negative 消極的 0:Low 低 1:Medium 中 2:High 高 3:Top 緊急 star タスクにスターがついているかどうかのboolean(0または1)です。 modified タスクが最後に修正された際のGMT UNIXタイムスタンプです。 completed タスクが終了した際のGMT UNIXタイムスタンプです。終了していなければ0です。Toodledoでは終了時刻は追っていないので、終了時刻は常に正午となります。 added タスクが追加された際のGMT UNIXタイムスタンプです。Toodledoでは追加時刻は追っていないので、追加時刻は常に正午となります。 timer タイマーにおいて、現在のセッションを含まずに、経過した時間(秒)を示す値です。 The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session. timeron タイマーが起動している場合、ここにはタイマーが起動した最後の時間を示すUNIXタイムスタンプが保存されます。したがって、タイマーがまさに稼働中の場合、ユーザーには経過時間との差(timer欄)を計算して表示する必要があります。計算式は、Total Time=timer+(now-timeron) です。ただし、nowは現在日時のUNIXタイムスタンプです。 note 32000バイトまでのtext stringです。設定する際、 は %26 に、; は %3B にそれぞれエンコードしてください。 meta 255バイトまでのtext stringです。タスクのメタデータを保持します。Toodledoに適切な項目がないデータを同期するのに便利です。このデータはタスクIDごとに一意です。このデータはあなたのアプリケーションIDごとのプライベートなものです。ユーザーも他のアプリケーションIDも、あなたのアプリケーションがここに記述したデータを見ることはできません。実行の詳細により、meta項目を使用することでそれぞれのAPIを呼び出すのに余計に時間がかかることになります。したがって、必要なときのみ利用するようにしてください。 Because of an implementation detail, using the meta field introduces extra latency to each API call, so you should only use this field when necessary. タスクの取得 タスクの追加 POSTにより tasks/add.php APIを呼び出すことにより、一度に50件までのタスクを追加することができます。titleは必須項目です。 必須項目 title オプション folder, context, goal, location, priority, status, star, duration, remind, starttime, duetime, completed, duedatemod, repeat, repeatFrom, tag, duedate, startdate, note, parent, meta (言及なし) id, children, order, length, modified, added, timer, timeron ref という特別な項目があります。これは英数字のID番号で、これを通すことによって同期後にモノを一致させるのを補助する目的で用いられます。There is also a special field called "ref" that you can use to pass through an alphanumeric id number to aid in matching things up after a sync. ref はタスクには保存されず、このコールにてエコーバックされるだけです。The "ref" field is not saved into the task, it is only echoed back to you on this call. タスクは、以下のようなJSONオブジェクトを生成し、POSTによってAPIに送信することで追加されます。改行文字は \n としてください。データは適切にURLで送信できるようにエンコードしてください(%XXという文字列は+という文字にエンコードされます:symbols replaced with their %XX equivalent and spaces encoded as +)。各行のそれぞれの要素がひとつのタスクオブジェクトとなります。効率のために、単に設定したい項目だけを送信してください。 http //api.toodledo.com/2/tasks/add.php?key=YourKey; tasks=[{ title %3A My Task }%2C{ title %3A Another %2C star %3A 1 %2C ref %3A 98765 }]; fields=folder,star アクションが成功すると、追加されたタスクは追加された順に返されます。個々のタスクに何らかのエラーが生じた場合は、返されたタスクの内部にアウトプットされるので、どのアクションが失敗したのかを特定することができます。 JSON [{ id 1234 , title My Task , modified 1281990824, completed 0, folder 0 , star 0 }, { id 1235 , title Another , modified 1280877483, completed 0, folder 0 , star 1 , ref 98765 }] URLに "f=xml" を付加することによって、APIが返す際のフォーマットをxmlに指定することもできます。 http //api.toodledo.com/2/tasks/add.php?key=YourKey; tasks=[{ title %3A My Task }%2C{ title %3A Another %2C star %3A 1 %2C ref %3A 98765 }]; fields=folder,star;f=xml XML tasks task id 1234 /id title My Task /title folder 0 /folder modified 1234567890 /modified completed /completed star 0 /star /task task id 1235 /id title Another /title folder 0 /folder modified 1234567890 /modified completed /completed star 1 /star ref 98765 /ref /task /tasks タスクの更新 タスクの削除 削除されたタスクの取得 エラーコード一覧
https://w.atwiki.jp/tutorial-memo/pages/15.html
wxPython API wxPython API is a set of functions and widgets. Widgets are essential building blocks of a GUI application. Under Windows widgets are calles controls. We can roughly divide programmers into two groups. They code applications or libraries. In our case, wxPython is a library that is used by application programmers to code applications. Technically, wxPython is a wrapper over a C++ GUI API called wxWidgets. So it is not a native API. e.g. not written directly in Python. The only native GUI library for an interpreted language that I know is Java s Swing library. Wxpython API は関数とウィジットのセットである。ウィジットは肝心な GUI アプリケーションの一部である。 Windows環境下では、ウィジットはコントロールを呼んでいる。 だいたい、アプリケーションとライブラリの二つのグループに分けることができるだろう。 wxPython はアプリケーション作成者がアプリケーションを記述する時に使うライブラリである。 技術的には wxPython は wxWidgets の C++ GUI API を呼ぶラッパーだ。 そう、ネイティブな API ではない。直接 Python で書かれていない。 (?)インタプリタ言語でネイティブ GUI ライブラリなものは、私の知る限り Java の Swing ライブラリのみである。 In wxPython we have lot s of widgets. These can be divided into some logical groups. wxPython には沢山のウィジットがある。論理的なグループに分けてみよう。 Base Widgets ベース ウィジット These widgets provide basic functionality for derived widgets. They are usually not used directly. これらのウィジットは基本的な機能をウィジットに付与している。ただ、普通は直接使わない。 wx.Window wx.Control wx.ControlWithItem Top level Widgets トップレベル ウィジット These widgets exist independently of each other. これらのウィジットはそれぞれ独立している。 wx.Frame wx.MDIParentFrame wx.MDIChildFrame wx.Dialog wx.PopupWindow Containers コンテナ Containers contain other widgets. These widgets are called children. コンテナは他のウィジットを収納できる。収納されたウィジットは「子ウィジット」と呼ばれる。 wx.Panel wx.Notebook wx.ScrolledWindow wx.SplitterWindow Dynamic Widgets ダイナミック ウィジット These widgets can be edited by users. これらのウィジットはユーザーによって編集される。 wx.Button wx.BitmapButton wx.Choice wx.ComboBox wx.CheckBox wx.Grid wx.ListBox wx.RadioBox wx.RadioButton wx.ScrollBar wx.SpinButton wx.SpinCtrl wx.Slider wx.TextCtrl wx.ToggleButton Static Widgets スタティック ウィジット These widgets display informatin. They cannot be edited by user. これらのウィジットは情報を表示する。これらはユーザーが編集できない。 wx.Gauge wx.StaticText wx.StaticBitmap wx.StaticLine wx.StaticBox Other Widgets その他のウィジット These widgets implement statusbar, toolbar and menubar in an application. これらのウィジットはアプリケーションのステータスバーやツールバー、メニューバーになる。 wx.MenuBar wx.ToolBar wx.StatusBar
https://w.atwiki.jp/api_programming/pages/73.html
Contextとは contextリストの同期 Contextsの取得レスポンス Contextsの追加 Contextsの編集 Contextsの削除レスポンス エラーコード Contextとは GTDでよく出てくる概念で、そのタスクを完了すべき状況を指す(ことが多い)。例えば、「仕事」「家庭」「買い物」等々がcontextの例。 contextリストの同期 Syncing contexts is fairly straight forward. The first thing to do is add any new contexts you have created and delete any contexts that you have deleted. Then, look at the "lastedit_context" timestamp returned from Account Info to determine if any changes have happened on the server since the last time you synced. If yes, then you need to fetch the contexts from the server and integrate this into your local copy. This is where you would do conflict resolution if a context was edited in both places. After this, if you have any contexts that you edited, you can send these edits up to the server. Sync Flowchart Contextsの取得 contexts/get.php http //api.toodledo.com/3/contexts/get.php?access_token=yourtoken GET,POST レスポンス contextの名前とidのリスト(とpravate) [{"id" 123,"name" "Work","private" 0},{"id" 456,"name" "Home","private" 1},{"id" 789,"name" "Car","private" 0}] xml形式はf=xmlオプションで取得 Contextsの追加 Add a context using the "contexts/add.php" API call. You can access this via POST. Context names must be unique within an account. If you try to add a context that already exists, you ll get an error. Each user can have up to 1000 contexts. If you try to add more than this, you will get an error. name A text string up to 32 characters. (required) private A boolean value (0 or 1) that describes if this context can be shared. A value of 1 means that this context is private. http //api.toodledo.com/3/contexts/add.php name=MyContext access_token=yourtoken If the add was successful the new context will be returned. [{"id" 12345,"name" "MyContext","private" 0}] Contextsの編集 Edit a context using the "contexts/edit.php" API call. You can access this via POST. Context names must be unique within an account. If you try to edit the context name to one that already exists, you will get an error. If you try to edit the context, but pass in the same values that already exist on the server, you will get an error. You should avoid making unnecessary edits. id The id number of the context to edit. (required) name A text string up to 32 characters. (required) private A boolean value (0 or 1) that describes if this context can be shared. A value of 1 means that this context is private. http //api.toodledo.com/3/contexts/edit.php id=12345 name=MyContext access_token=yourtoken If the edit was successful the edited context will be returned. [{"id" 12345,"name" "MyContext","private" 0}] Contextsの削除 contexts/delete.phphttp //api.toodledo.com/3/contexts/delete.php id=12345;access_token=yourtoken POST コンテキストのidが必須 削除後、削除されたコンテクストを持っていたタスクは、コンテクストがnoneに設定される。 レスポンス 正常に削除されると以下のようなレスポンスが返ってくる {"deleted" 12345} エラーコード Any of the API calls can return error messages. Here is a list of the error messages that you may receive from the contexts API endpoints. If there was an error when editing or deleting a context, the id number that you attempted to edit will be included in the error s "ref" field for your reference. 301 Your context must have a name. 302 A context with that name already exists. 303 Max contexts reached (1000). 304 Empty id. 305 Invalid context. 306 Nothing was edited. Examples {"errorCode" 302,"errorDesc" "A context with that name already exists","ref" 1234} error id="302" ref="1234" A context with that name already exists /error
https://w.atwiki.jp/api_programming/pages/131.html
Module Toybox 下位ページ Activity ActivityMonitor ActivityRecording Ant Application Attention Communications Graphics Lang Position Sensor System Time UserProfile WatchUi Content Module ToyboxDefined Under Namespace Module Toybox Defined Under Namespace ModulesActivity ActivityMonitor ActivityRecording, Ant, Application, Attention, Communications, Graphics, Lang, Math, PersistedLocations Position Sensor, System, Test, Time, Timer UserProfile WatchUi